package com.ktjy.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * 代码生成业务表实体类
 *
 * @author LILIBO
 * @since 2025-06-18
 */
@Tag(name = "代码生成业务表", description = "代码生成业务表数据")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("`gen_table`")
public class GenTable implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 生成表编号ID
     */
    @Schema(description = "生成表编号ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 表名称
     */
    @Schema(description = "表名称")
    private String tableName;

    /**
     * 表描述
     */
    @Schema(description = "表描述")
    private String tableComment;

    /**
     * 关联子表的表名
     */
    @Schema(description = "关联子表的表名")
    private String subTableName;

    /**
     * 子表关联的外键名
     */
    @Schema(description = "子表关联的外键名")
    private String subTableFkName;

    /**
     * 实体类名称
     */
    @Schema(description = "实体类名称")
    private String className;

    /**
     * 使用的模板 crud-单表操作;tree-树表操作
     */
    @Schema(description = "使用的模板 crud-单表操作;tree-树表操作")
    private String tplCategory;

    /**
     * 前端模板类型（element-ui模版 element-plus模版）
     */
    @Schema(description = "前端模板类型（element-ui模版 element-plus模版）")
    private String tplWebType;

    /**
     * 生成包路径
     */
    @Schema(description = "生成包路径")
    private String packageName;

    /**
     * 生成模块名
     */
    @Schema(description = "生成模块名")
    private String moduleName;

    /**
     * 生成业务名
     */
    @Schema(description = "生成业务名")
    private String businessName;

    /**
     * 生成功能名
     */
    @Schema(description = "生成功能名")
    private String functionName;

    /**
     * 生成功能作者
     */
    @Schema(description = "生成功能作者")
    private String functionAuthor;

    /**
     * 生成代码方式 0-压缩包;1-自定义路径
     */
    @Schema(description = "生成代码方式 0-压缩包;1-自定义路径")
    private Integer genType;

    /**
     * 生成路径（不填默认项目路径）
     */
    @Schema(description = "生成路径（不填默认项目路径）")
    private String genPath;

    /**
     * 其它生成选项
     */
    @Schema(description = "其它生成选项")
    private String options;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 状态 0-正常;1-禁用
     */
    @Schema(description = "状态 0-正常;1-禁用")
    private Integer status;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private String modifyTime;

    /**
     * 删除标记 0-正常;1-删除
     */
    @Schema(description = "删除标记 0-正常;1-删除")
    private Integer deleteFlag;

    /**
     * 带参构造方法
     */
    public GenTable(String tableName, String tableComment, String subTableName, String subTableFkName, String className, String tplCategory, String tplWebType, String packageName, String moduleName, String businessName, String functionName, String functionAuthor, Integer genType, String genPath, String options, String remark, Integer status, String createTime, String modifyTime, Integer deleteFlag) {
        this.tableName = tableName;
        this.tableComment = tableComment;
        this.subTableName = subTableName;
        this.subTableFkName = subTableFkName;
        this.className = className;
        this.tplCategory = tplCategory;
        this.tplWebType = tplWebType;
        this.packageName = packageName;
        this.moduleName = moduleName;
        this.businessName = businessName;
        this.functionName = functionName;
        this.functionAuthor = functionAuthor;
        this.genType = genType;
        this.genPath = genPath;
        this.options = options;
        this.remark = remark;
        this.status = status;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.deleteFlag = deleteFlag;
    }

}
